//
//  DetailsVc.m
//  WY_Milk
//
//  Created by wangyang on 2020/2/3.
//  Copyright © 2020 wangyang. All rights reserved.
//

#import "DetailsVc.h"
#import "RJNavigationBar.h"
#import "Secview.h"
#import "SureOrderVc.h"
#import "WyLnadViewController.h"

@interface DetailsVc ()<UIScrollViewDelegate>
@property (nonatomic,strong) UIScrollView   *WyScrollView;
@property (nonatomic, strong)RJNavigationBar *NvigationBar;

@end

@implementation DetailsVc
-(void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:animated];
    [self.NvigationBar showCustomNavigationBar:YES];
}
//隐藏
-(void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];

   [self.navigationController setNavigationBarHidden:NO animated:animated];
    [self.NvigationBar showCustomNavigationBar:NO];
}
//检测
-(void)scrollViewDidScroll:(UIScrollView *)scrollView {
    CGFloat offsetY = scrollView.contentOffset.y;
    CGFloat coloroffset = offsetY/ 64;
    coloroffset = coloroffset > 1?1:coloroffset;
    [self.NvigationBar setupBgColorAlpha:coloroffset animation:0.4 compeleteBlock:^{
        
    }];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
     self.view.backgroundColor = UIColorFromRGB(0xF8F8F8);
    [self WyScrollView];
    [self initSetUI];
      
      self.NvigationBar = [RJNavigationBar createCustomNavigationBar];
      self.NvigationBar.title = @"详情";
    self.NvigationBar.titleColor = WyBlackColor;
      
                        __weak typeof(self) weakSelf  = self;
                        weakSelf.NvigationBar.clickleftItemBlock = ^{
                 
                            
                            [self.navigationController popViewControllerAnimated:YES];
                            NSLog(@"点击返回按钮");
                        };
                        weakSelf.NvigationBar.clickrightItemBlock = ^{
                            Secview *se =[[Secview alloc] init];
                            [self.navigationController pushViewController:se animated:YES];
                        };
                        [self.view addSubview:self.NvigationBar];
    
    
    if (@available(iOS 11.0, *)) {
        
        self.WyScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    }
}


-(void)initSetUI
{
    
    
    
    self.NameLabe = [UILabel labelWithContent:_DetailsVcDicy[@"name"] superView:self.OneView textColor:WyBlackColor font:WySYSTEMFONT(15) textAlignment:NSTextAlignmentLeft];
    [self.NameLabe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.equalTo(CGSizeMake(BiLiWidth(100), BiLiWidth(22)));
        make.left.mas_offset(BiLiWidth(15));
        make.top.equalTo(self.PicImg.bottom).offset(BiLiWidth(20));
    }];
    
    self.ScoreLabe = [UILabel labelWithContent:_DetailsVcDicy[@"Score"]superView:self.OneView textColor:UIColorFromRGB(0xFADB14) font:WySYSTEMFONT(15) textAlignment:NSTextAlignmentLeft];
    [self.ScoreLabe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.equalTo(CGSizeMake(BiLiWidth(100), BiLiWidth(22)));
        make.right.mas_offset(BiLiWidth(-15));
        make.top.equalTo(self.PicImg.bottom).offset(BiLiWidth(20));
    }];
    
    
    self.MoneyLabe = [UILabel labelWithContent:_DetailsVcDicy[@"money"]superView:self.OneView textColor:UIColorFromRGB(0xFADB14) font:WySYSTEMFONT(15) textAlignment:NSTextAlignmentLeft];
    [self.MoneyLabe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.equalTo(CGSizeMake(BiLiWidth(60), BiLiWidth(22)));
        make.left.mas_offset(BiLiWidth(15));
        make.top.equalTo(self.NameLabe.bottom).offset(BiLiWidth(8));
    }];
    
    
    self.DiscountLabe = [UILabel labelWithContent:_DetailsVcDicy[@"Promotion"]superView:self.OneView textColor:UIColorFromRGB(0xFFA431) font:WySYSTEMFONT(12) textAlignment:NSTextAlignmentCenter];
    WyViewBorder(_DiscountLabe, UIColorFromRGB(0xFFA431), BiLiWidth(1));
    WyViewRadius(_DiscountLabe, BiLiWidth(4));
    [self.DiscountLabe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.equalTo(CGSizeMake(BiLiWidth(100), BiLiWidth(22)));
        make.left.equalTo(self.MoneyLabe.right).offset(BiLiWidth(10));
        make.top.equalTo(self.NameLabe.bottom).offset(BiLiWidth(8));
    }];
    
    
    
    
    self.FavoriteBtn = [UIButton ButtonWithText:@"" superView:self.OneView TextNormalcolor:[UIColor clearColor] backgroundColor:[UIColor clearColor] fontSize:10 addTarget:self selector:@selector(Favoriteselector)];
    [self.FavoriteBtn setBackgroundImage:[UIImage imageNamed:@"已收藏"] forState:0];
    [self.FavoriteBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.equalTo(CGSizeMake(BiLiWidth(40), BiLiWidth(40)));
        make.top.equalTo(self.NameLabe.bottom).offset(BiLiWidth(5));
        make.right.mas_offset(BiLiWidth(-20));
    }];
    
    
    self.DescriptionLabe = [UILabel labelWithContent:@"作品简介" superView:self.TwoView textColor:WyBlackColor font:WySYSTEMFONT(16) textAlignment:NSTextAlignmentLeft];
    [self.DescriptionLabe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.equalTo(CGSizeMake(BiLiWidth(300), BiLiWidth(22)));
        make.left.mas_offset(BiLiWidth(20));
        make.top.mas_offset(BiLiWidth(20));
    }];
    
    
    self.DetailsDescriptionLabe = [UILabel labelWithContent:_DetailsVcDicy[@"mes"] superView:self.TwoView textColor:UIColorFromRGB(0x666666) font:WySYSTEMFONT(13) textAlignment:NSTextAlignmentLeft];
    float  DetailsDescription = [AdaptiveHeight adaptiveHeightLineSpaceString:self.DetailsDescriptionLabe sizeWidth:WySCREENWIDTH-BiLiWidth(20) lineSpace:1 font:14];
    [self.DetailsDescriptionLabe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.equalTo(CGSizeMake(WySCREENWIDTH-BiLiWidth(20), DetailsDescription));
        make.centerX.mas_offset(BiLiWidth(0));
        make.top.equalTo(self.DescriptionLabe.bottom).offset(BiLiWidth(5));
    }];
    
    
    
    self.ProductDesciptionLabe = [UILabel labelWithContent:@"商品介绍" superView:self.TwoView textColor:WyBlackColor font:WySYSTEMFONT(16) textAlignment:NSTextAlignmentLeft];
    [self.ProductDesciptionLabe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.equalTo(CGSizeMake(BiLiWidth(300), BiLiWidth(22)));
        make.left.mas_offset(BiLiWidth(20));
        make.top.equalTo(self.DetailsDescriptionLabe.bottom).offset(BiLiWidth(30));
    }];
    
//    DetailsProductDesciptionLabe
    
    self.DetailsProductDesciptionLabe = [UILabel labelWithContent:@"出版社： 作家出版社\n商品编码：12239650\n包装：平装\n语种：中文" superView:self.TwoView textColor:UIColorFromRGB(0x666666) font:WySYSTEMFONT(13) textAlignment:NSTextAlignmentLeft];
    float height = [AdaptiveHeight adaptiveHeightLineSpaceString:self.DetailsProductDesciptionLabe sizeWidth:BiLiWidth(300) lineSpace:2 font:13];
    [self.DetailsProductDesciptionLabe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.equalTo(CGSizeMake(BiLiWidth(300), height));
        make.left.mas_offset(BiLiWidth(20));
        make.top.equalTo(self.ProductDesciptionLabe.bottom).offset(BiLiWidth(5));
    }];
    
    
//    CustomerReviewsLabe
    
    self.CustomerReviewsLabe = [UILabel labelWithContent:@"好书推荐" superView:self.ThreeView textColor:WyBlackColor font:WySYSTEMFONT(16) textAlignment:NSTextAlignmentLeft];
    [self.CustomerReviewsLabe mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.equalTo(CGSizeMake(BiLiWidth(300), BiLiWidth(22)));
        make.left.mas_offset(BiLiWidth(20));
        make.top.mas_offset(BiLiWidth(20));
    }];
    
    
    
    
    NSArray *fuleiArray = @[_DetailsVcDicy[@"name"],_DetailsVcDicy[@"UserName"],_DetailsVcDicy[@"Score"],_DetailsVcDicy[@"money"]];
              for (int i = 0; i<fuleiArray.count; i++) {
                  UILabel *labe = [UILabel labelWithContent:fuleiArray[i]superView:self.ThreeView textColor:WyBlackColor font:WySYSTEMFONT(14) textAlignment:NSTextAlignmentLeft];
                  [labe mas_makeConstraints:^(MASConstraintMaker *make) {
                      make.size.equalTo(CGSizeMake(BiLiWidth(200), BiLiWidth(20)));
                      make.left.equalTo(self.ThreePicImg.right).offset(BiLiWidth(10));
                      make.top.equalTo(self.CustomerReviewsLabe.bottom).offset(BiLiWidth(10)+BiLiWidth(25)*i);
                  }];
                  labe.tag = i;
                  if (labe.tag == 0) {
                      _ThreeNameLabe = labe;
                  }else if (labe.tag == 1)
                  {
                      _ThreeUserNameLabe = labe;
                      _ThreeUserNameLabe.textColor = UIColorFromRGB(0x999999);
                      
                  }
                  else if (labe.tag == 2)
                  {
                      _ThreeScoreLabe = labe;
                      _ThreeScoreLabe.textColor = UIColorFromRGB(0xFADB14);
              
                  }
                  else if (labe.tag == 3)
                  {
                      _ThreeMoneyLabe = labe;
                      _ThreeMoneyLabe.textColor = UIColorFromRGB(0xFF4949);
                      
                  }
              }
    

    
    
//    NSArray *EvaluationImgArray = @[_DetailsVcDicy[@"UserImgOne"],_DetailsVcDicy[@"UserImgTwo"]];
//    NSArray *EvaluationNameArray = @[_DetailsVcDicy[@"UserNameOne"],_DetailsVcDicy[@"UserNameTwo"]];
//    NSArray *EvaluationMesArray = @[_DetailsVcDicy[@"UserMesOne"],_DetailsVcDicy[@"UserMesTwo"]];
//    NSArray *EvaluationTimeArray = @[@"2019-12-17",@"2019-12-18"];
//
//    for (int i = 0; i<EvaluationImgArray.count; i++) {
//        UIImageView *EvaluationImg = [UIImageView imageWithImgName:EvaluationImgArray[i] superView:self.ThreeView];
//        EvaluationImg.backgroundColor = WyColor;
//        [EvaluationImg mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.size.equalTo(CGSizeMake(BiLiWidth(40), BiLiWidth(40)));
//            make.left.mas_offset(BiLiWidth(17));
//            make.top.equalTo(self.CustomerReviewsLabe.bottom).offset(BiLiWidth(14)+BiLiWidth(100)*i);
//        }];
//
//        UILabel *EvaluationName = [UILabel labelWithContent:EvaluationNameArray[i] superView:self.ThreeView textColor:[UIColor blackColor] font:WySYSTEMFONT(12) textAlignment:NSTextAlignmentLeft];
//        [EvaluationName mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.size.equalTo(CGSizeMake(BiLiWidth(100), BiLiWidth(17)));
//            make.left.equalTo(EvaluationImg.right).offset(BiLiWidth(11));
//            make.top.equalTo(self.CustomerReviewsLabe.bottom).offset(BiLiWidth(25)+BiLiWidth(100)*i);
//        }];
//
//        UILabel *EvaluationMes = [UILabel labelWithContent:EvaluationMesArray[i] superView:self.ThreeView textColor:UIColorFromRGB(0x333333) font:WySYSTEMFONT(13) textAlignment:NSTextAlignmentLeft];
//        float Evaluation = [AdaptiveHeight adaptiveHeightLineSpaceString:EvaluationMes sizeWidth:WySCREENWIDTH-BiLiWidth(40) lineSpace:1 font:13];
//        [EvaluationMes mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.size.equalTo(CGSizeMake(WySCREENWIDTH-BiLiWidth(40), Evaluation));
//            make.left.mas_offset(BiLiWidth(19));
//            make.top.equalTo(EvaluationName.bottom).offset(BiLiWidth(25));
//        }];
//
//        UIView *lineView = [[UIView alloc]init];
//        [self.ThreeView addSubview:lineView];
//        lineView.backgroundColor = UIColorFromRGB(0xF8F8F8);
//        [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.size.equalTo(CGSizeMake(WySCREENWIDTH-BiLiWidth(60), BiLiWidth(1)));
//            make.top.equalTo(EvaluationMes.bottom).offset(BiLiWidth(10));
//            make.centerX.mas_offset(0);
//        }];
//
//        UILabel *EvaluationTime = [UILabel labelWithContent:EvaluationTimeArray[i] superView:self.ThreeView textColor:UIColorFromRGB(0x888888) font:WySYSTEMFONT(12) textAlignment:NSTextAlignmentRight];
//        [EvaluationTime mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.size.equalTo(CGSizeMake(BiLiWidth(140), BiLiWidth(16)));
//            make.right.mas_offset(BiLiWidth(-16));
//            make.top.equalTo(self.CustomerReviewsLabe.bottom).offset(BiLiWidth(10)+BiLiWidth(100)*i);
//        }];
//
//        for (int str = 0; str<5; str++) {
//            UIImageView *EvaluationStrImg = [UIImageView imageWithImgName:@"收 藏备份 3" superView:self.ThreeView];
//            [EvaluationStrImg mas_makeConstraints:^(MASConstraintMaker *make) {
//                make.size.equalTo(CGSizeMake(BiLiWidth(15), BiLiWidth(15)));
//                make.right.mas_offset(BiLiWidth(-90)+(BiLiWidth(15)+BiLiWidth(2))*(str%5));
//                make.top.equalTo(EvaluationTime.bottom).offset(5);
//            }];
//
//        }
//    }

    
    
    
    for (int i = 0; i<2; i++) {
        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.view addSubview:btn];
        [btn addTarget:self action:@selector(selector:) forControlEvents:UIControlEventTouchUpInside];
        [btn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.equalTo(CGSizeMake((WySCREENWIDTH-BiLiWidth(20))/2, BiLiWidth(50)));
            make.bottom.mas_offset(BiLiWidth(-10));
            make.left.mas_offset(BiLiWidth(5)+(WySCREENWIDTH-BiLiWidth(20)+BiLiWidth(20))/2*i);
        }];
        btn.tag = i;
        if (btn.tag == 0) {
            [btn setBackgroundColor:[UIColor whiteColor]];
            [btn setImage:[UIImage imageNamed:@"客服"] forState:0];
        }
        else
        {
            [btn setBackgroundColor:UIColorFromRGB(0xFADB14)];
            [btn setTitle:@"去预定" forState:0];
            [btn setTitleColor:[UIColor whiteColor] forState:0];
        }
    }
    
}

-(void)Favoriteselector
{

      if ([WyEngineering sharedUser].login == YES) {

            [MyProgressHUD showWithMaskType:MyProgressHUDMaskTypeBlack];

                  //定时器
                  dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{

                    [MyProgressHUD dismiss];

        [[AlertControllerCustom shareInstance] showAlert:@"已收藏" viewController:self];
                  });


        }else{

            [MyProgressHUD showWithMaskType:MyProgressHUDMaskTypeBlack];

                         //定时器
                         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{

                           [MyProgressHUD dismiss];
                          WyLnadViewController *VC = [[WyLnadViewController alloc] init];
                                              VC.LandVcBlock = ^{
                                                  //                        [self.MyTableView removeFromSuperview];
                                                  //                        self.MyTableView = nil;
                                                  self.tabBarController.selectedIndex = 0;
                                              };
                                              [self.navigationController pushViewController:VC animated:YES];
    //                         [self presentViewController:VC animated:YES completion:nil];
                         });


        }




}

-(void)selector:(UIButton *)button{

    
//    if (button.tag == 0) {
//         [[AlertControllerCustom shareInstance] showAlert:@"请拨打官方服务热线\n0371-66666" viewController:self];
//    }
//    else
//    {
//        SureOrderVc *sure = [[SureOrderVc alloc]init];
//        sure.SureOrderVcDicy = self.DetailsVcDicy;
//        [self.navigationController pushViewController:sure animated:YES];
//    }
    
    
    if (button.tag == 0) {

          if ([WyEngineering sharedUser].login == YES) {

                [MyProgressHUD showWithMaskType:MyProgressHUDMaskTypeBlack];

                      //定时器
                      dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{

                        [MyProgressHUD dismiss];

        [[AlertControllerCustom shareInstance] showAlert:@"请拨打官方服务热线\n0371-66666" viewController:self];
                      });


            }else{

                [MyProgressHUD showWithMaskType:MyProgressHUDMaskTypeBlack];

                             //定时器
                             dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{

                               [MyProgressHUD dismiss];
                              WyLnadViewController *VC = [[WyLnadViewController alloc] init];
                                                  VC.LandVcBlock = ^{
                                                      //                        [self.MyTableView removeFromSuperview];
                                                      //                        self.MyTableView = nil;
                                                      self.tabBarController.selectedIndex = 0;
                                                  };
                                                  [self.navigationController pushViewController:VC animated:YES];
        //                         [self presentViewController:VC animated:YES completion:nil];
                             });


            }




    }
    else
    {

        if ([WyEngineering sharedUser].login == YES) {

                    [MyProgressHUD showWithMaskType:MyProgressHUDMaskTypeBlack];

                          //定时器
                          dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{

                            [MyProgressHUD dismiss];

                    SureOrderVc *sure = [[SureOrderVc alloc]init];
                              sure.SureOrderVcDicy = self->_DetailsVcDicy;
                   [self.navigationController pushViewController:sure animated:YES];
                          });


                }else{

                    [MyProgressHUD showWithMaskType:MyProgressHUDMaskTypeBlack];

                                 //定时器
                                 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{

                                   [MyProgressHUD dismiss];
                                  WyLnadViewController *VC = [[WyLnadViewController alloc] init];
                                                      VC.LandVcBlock = ^{
                                                          //                        [self.MyTableView removeFromSuperview];
                                                          //                        self.MyTableView = nil;
                                                          self.tabBarController.selectedIndex = 0;
                                                      };
                                                      [self.navigationController pushViewController:VC animated:YES];
            //                         [self presentViewController:VC animated:YES completion:nil];
                                 });


                }


    }

}

- (UIScrollView *)WyScrollView {
    
    if (!_WyScrollView) {
        _WyScrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds];
        [self.view addSubview:_WyScrollView];
        _WyScrollView.userInteractionEnabled = YES;
        _WyScrollView.showsVerticalScrollIndicator = NO;
        _WyScrollView.delegate = self;
        _WyScrollView.contentSize = CGSizeMake(WySCREENWIDTH, WySCREENHEIGHT*1.5);
        [_WyScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.top.bottom.mas_offset(0);
        }];
        
        
        [self OneView];
        [self TwoView];
        [self ThreeView];
    }
    return _WyScrollView;
}
-(UIView *)OneView

{
    
    if (!_OneView) {
        _OneView = [[UIView alloc]init];
        [self.WyScrollView addSubview:_OneView];
        _OneView.backgroundColor = [UIColor whiteColor];
        [_OneView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.equalTo(CGSizeMake(WySCREENWIDTH, BiLiWidth(300)));
            make.top.mas_offset(BiLiWidth(10));
            make.centerX.mas_offset(0);
        }];
        [self PicImg];
    }
    return _OneView;
    
}

- (UIImageView *)PicImg

{
    if (!_PicImg) {
        _PicImg = [UIImageView imageWithImgName:_DetailsVcDicy[@"img"] superView:self.OneView];
        _PicImg.backgroundColor = WyColor;
        WyViewRadius(_PicImg, BiLiWidth(5));
        [_PicImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.equalTo(CGSizeMake(BiLiWidth(200), BiLiWidth(180)));
            make.top.mas_offset(BiLiWidth(30));
            make.centerX.mas_offset(0);
        }];
    }
    return _PicImg;
}
-(UIView *)TwoView

{
    
    if (!_TwoView) {
        _TwoView = [[UIView alloc]init];
        [self.WyScrollView addSubview:_TwoView];
        _TwoView.userInteractionEnabled = YES;
        _TwoView.backgroundColor = [UIColor whiteColor];
        [_TwoView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.equalTo(CGSizeMake(WySCREENWIDTH, BiLiWidth(300)));
            make.top.equalTo(self.OneView.bottom).offset(BiLiWidth(20));
            make.centerX.mas_offset(0);
        }];
        
    }
    return _TwoView;
    
}
-(UIView *)ThreeView

{
    
    if (!_ThreeView) {
        _ThreeView = [[UIView alloc]init];
        [self.WyScrollView addSubview:_ThreeView];
        _ThreeView.userInteractionEnabled = YES;
        _ThreeView.backgroundColor = [UIColor whiteColor];
        [_ThreeView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.equalTo(CGSizeMake(WySCREENWIDTH, BiLiWidth(150)));
            make.top.equalTo(self.TwoView.bottom).offset(BiLiWidth(20));
            make.centerX.mas_offset(0);
        }];
        
    }
    return _ThreeView;
    
}
- (UIImageView *)ThreePicImg

{
    if (!_ThreePicImg) {
        _ThreePicImg = [UIImageView imageWithImgName:_DetailsVcDicy[@"RecommendedImg"] superView:self.ThreeView];
        _ThreePicImg.backgroundColor = WyColor;
        WyViewRadius(_ThreePicImg, BiLiWidth(5));
        [_ThreePicImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.equalTo(CGSizeMake(BiLiWidth(65), BiLiWidth(95)));
            make.top.equalTo(self.CustomerReviewsLabe.bottom).offset(BiLiWidth(10));
            make.left.mas_offset(BiLiWidth(20));
        }];
    }
    return _ThreePicImg;
}

- (UILabel *)NameLabe
{
    if (!_NameLabe) {
        _NameLabe = [[UILabel alloc]init];
    }
    return _NameLabe;
}
- (UILabel *)MoneyLabe
{
    if (!_MoneyLabe) {
        _MoneyLabe = [[UILabel alloc]init];
    }
    return _MoneyLabe;
}
- (UILabel *)ScoreLabe
{
    if (!_ScoreLabe) {
        _ScoreLabe = [[UILabel alloc]init];
    }
    return _ScoreLabe;
}
- (UILabel *)DiscountLabe
{
    if (!_DiscountLabe) {
        _DiscountLabe = [[UILabel alloc]init];
    }
    return _DiscountLabe;
}
- (UIButton *)FavoriteBtn
{
    if (!_FavoriteBtn) {
        _FavoriteBtn = [[UIButton alloc]init];
    }
    return _FavoriteBtn;
}
- (UILabel *)DescriptionLabe
{
    if (!_DescriptionLabe) {
        _DescriptionLabe = [[UILabel alloc]init];
    }
    return _DescriptionLabe;
}
- (UILabel *)ProductDesciptionLabe
{
    if (!_ProductDesciptionLabe) {
        _ProductDesciptionLabe = [[UILabel alloc]init];
    }
    return _ProductDesciptionLabe;
}
-(UILabel *)DetailsProductDesciptionLabe

{
    if (!_DetailsProductDesciptionLabe) {
        
        _DetailsProductDesciptionLabe = [[UILabel alloc]init];
    }
    return _DetailsProductDesciptionLabe;
}

- (UILabel *)DetailsDescriptionLabe
{
    if (!_DetailsDescriptionLabe) {
        _DetailsDescriptionLabe = [[UILabel alloc]init];
    }
    return _DetailsDescriptionLabe;
}

- (UILabel *)CustomerReviewsLabe

{
    if (!_CustomerReviewsLabe) {
        _CustomerReviewsLabe = [[UILabel alloc]init];
    }
    return _CustomerReviewsLabe;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
